package com.pdwl.controller;


import com.pdwl.common.dtos.PageRequestDto;
import com.pdwl.common.dtos.PageResponseResult;
import com.pdwl.common.vo.TaskTransportVo;
import com.pdwl.common.vo.TransportOrderVo;
import com.pdwl.service.TaskTransportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 运单管理控制层
 *
 * @author Thd
 * @date 2023/1/11 10:22
 */
@RestController
@RequestMapping("api/web-manager/transport-order-manager")
@Api(tags = "运单管理")
public class TaskTransportController {
    @Autowired
    private TaskTransportService taskTransportService;
    //运单查询全部
    @PostMapping("/page")
    @ApiOperation("运单管理分页查询")
    public PageResponseResult findAll(@RequestBody PageRequestDto<TaskTransportVo> pageRequestDto) {
        return taskTransportService.findAll(pageRequestDto);
    }

    @GetMapping("/detail/{orderId}")
    @ApiOperation("运单管理详情")
    public TransportOrderVo detail(@PathVariable String orderId) {
        return taskTransportService.detail(orderId);
    }

}
